Once you have the sample description prepared, you can call AddMediaSample to add the effect description to the media. Listing 4 shows an example call.
Listing 4 Calling AddMediaSample to add the effect description
// Always call BeginMediaEdits before adding sample to a media
BeginMediaEdits(theEffectsMedia);
// Add the sample to the media
AddMediaSample(theEffectsMedia,
(Handle) theEffectDescription,
0,
GetHandleSize((Handle) theEffectDescription),
600,
(SampleDescriptionHandle) sampleDescription,
1,
0,
&sampleTime);
// End the media editing session
EndMediaEdits(theEffectsMedia);
| Previous | Chapter Contents | Chapter Top | Next |